Among common processes used to improve the visual perception of an image, noise reduction, sharpness improvement and improvement of the balance of brightness and contrast are included. The quality and the usefulness of each of these processes depend on the properties of the image in the vicinity of each pixel processed. Therefore, some zones of the image may be differentiated so as to select the most appropriate process for each zone.
FIG. 1 shows an image comprising two types of zones where it is desirable to process each zone differently: a flat zone 10, such as a zone depicting the sky, and a textured zone 12, such as a zone depicting leaves. In a flat zone, noise reduction is favored, while in a textured zone, sharpness, brightness, and contrast balancing are favored. Noise reduction techniques suited for textured zones can also be used, such as described in U.S. Patent Application Publication No. 2009/0141978 to Roffet et al.
Common image processes, i.e. at least the relatively simple ones preferably used in embedded systems, are based on a reference kernel defined around each pixel to be processed. FIG. 2 represents such a kernel. It is a 5×5-pixel square of the image, in the center of which is a pixel to be processed. This kernel size is common and offers a good complexity compromise.
FIG. 3 represents a reference kernel 14 processing stream, enabling differentiated processing according to the nature of the zone in which the pixel being processed is located. In block 16, a criterion representative of the pixel belonging to a flat zone (10 in FIG. 1) is calculated from the kernel. If the criterion is not met, the pixel is considered to belong to a textured zone (12), and the kernel 14 undergoes, in block 18, a process adapted to the textured zones. If the criterion is met, the kernel undergoes, in block 20, a process adapted to flat zones. The process in blocks 18 or 20 produces a single pixel Pxout, replacing the current pixel in the new image.
One example of selection criterion can be as follows. As represented in FIG. 2, for each pixel i in the reference kernel, the difference di between this pixel and the central pixel, which is the pixel to be processed, is calculated. In the case of a 5×5 kernel, 24 differences d1 to d24 are obtained, with the zero difference for the central pixel not being counted. The differences are calculated in terms of luminance.
It is then considered that the pixel to be processed belongs to a flat zone if the number of differences below a luminance threshold is close to the number of pixels in the kernel (e.g. at least equal to 22 in the case of a 5×5 kernel).
Occasionally, such algorithms do not classify certain pixels correctly. For example, if the pixels in the kernel are all similar except for the central pixel, all the differences have a high value, such that the criterion above classifies the pixel as not belonging to a flat zone, whereas it is manifestly an incorrect pixel in a flat zone. The pixel is thus classified as belonging to a textured zone. The textured zone then undergoes processes such as sharpness improvement, which may result in amplifying the singularity of the wrongly classified pixel, making it even more visible.
More complex algorithms would enable this specific example to be identified and to potentially correct it. However, it should be recalled that, within the framework of embedded systems, the complexity of the algorithms may need to be limited. Furthermore, only one striking singular case is mentioned above, but there are more subtle cases in which the pixels are wrongly classified and also generate unpleasant visual artifacts.
FIG. 4 shows a more detailed example of a processing stream 18 of the pixels classified as belonging to a textured zone. A RAM memory is used as a temporary working space and stores parts of the image being processed. A non-volatile memory NVM stores the original images and receives the images after processing. A first process NR includes, for example, an adaptive noise reduction optimized for textured zones, as disclosed in U.S. Patent Application Publication No. 2009/0141978 to Roffet et al. This process works on reference kernels 14 read in the original image, for example, 5×5-pixel kernels containing the pixel to be processed in the center. The pixels to be processed have been identified by the decision step 16 in FIG. 3. The process calculates a single pixel from the kernel, with the pixel being stored in the RAM memory.
The next step SHARP is, for example, an increase in the sharpness. This process also works on a reference kernel, 14.2, which may differ in size to the kernel 14. The kernel 14.2 is read in the RAM memory when the process NR has produced the pixels defining it. The process SHARP calculates a single pixel from the kernel 14.2, with the pixel being written in the RAM memory.
The next step USM comprises, for example, an increase in the acutance, which includes an increase in the local contrast and an accentuation in the transitions between two adjacent colors. This technique is commonly designated by the acronym USM (UnSharp Mask). Like the previous processes, the USM process works on a reference kernel 14.3, read in the RAM memory when the previous process has produced all the pixels of this kernel. The USM process produces from the kernel 14.3 a single pixel defining the final processed image, which is written, for example, in the non-volatile memory NVM.
It can be seen that each process works on pixels defining an intermediate image produced by the previous process. With three processes, two intermediate images are used, the necessary zones of which are stored in the RAM memory. This RAM memory is generally a fast-access memory so as not to slow down the processing. It is generally not possible to store the intermediate images in the non-volatile memory NVM, as access to such memories is too slow.